package com.tryon.repository;

import com.tryon.entity.GarmentLibrary;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GarmentLibraryRepository extends JpaRepository<GarmentLibrary, Long> {
    
    /**
     * 根据用户ID查询服装列表
     */
    List<GarmentLibrary> findByUserIdAndIsDeleted(Long userId, Integer isDeleted);
    
    /**
     * 根据用户ID和服装类型查询
     */
    List<GarmentLibrary> findByUserIdAndGarmentTypeAndIsDeleted(Long userId, String garmentType, Integer isDeleted);
}

